<!-- 投资新闻 -->
<template>
  <div>
    <Row
      type="flex"
      justify="center"
    >
      <Col
        span="24"
        v-for="(item,index) in InvestmentNews"
        :key="index"
      >
      <Card>
        <Row
          :gutter="16"
          class="top"
        >
          <Col span="6">
          <img :src="item.img">
          </Col>
          <Col span="17">
          <p>{{item.title}}</p>
          <p>
            <span>发布时间：{{item.starTime}}</span>
            <span>浏览次数： {{item.viewCount}} 次</span>
            文章标签：
          </p>
          <p>中新网北京8月22日电 此前，九部门联合下发《关于在人口净流入的大中城市加快发展住房租赁市场的通知》，12个城市被列为试点城市。记者梳理发现，广州、杭州、成都、郑州、沈阳、成都等9个试点城市已发布方案或介绍了方案的主要内容，各地均着力加强承租人权益保障。多地提出“购租同权”，从落… </p>
          <span @click="toInvestment_details">了解详情>></span>
          </Col>
        </Row>
      </Card>
      </Col>
    </Row>
  </div>
</template>

<script>
export default {
  data() {
    return {
      InvestmentNews: []
    }
  },
  created() {
    this.getInvestmentNews()
  },
  methods: {
    toInvestment_details(){
      this.$router.push({
        name:'investment_details'
      })
    },
    getInvestmentNews() {
      this.$axios.get('/InvestmentNews').then(res => {
        console.log(res)
        this.InvestmentNews = res.data.list
      })
    }
  }
}
</script>

<style scoped lang="less">
.top {
  img {
    width: 100%;
    height: 180px;
  }
  p {
    margin-bottom: 15px;
  }
  p:nth-child(1) {
    font: 700 20px/20px "Microsoft YaHei";
    color: #000;
  }
  p:nth-child(2) {
    font: 12px/12px "Microsoft YaHei";
    color: #999;
  }
  p:nth-child(3) {
    font: 16px/16px "Microsoft YaHei";
    color: #666;
  }
  span {
    cursor: pointer;
    font: 16px/16px "Microsoft YaHei";
    color: #5b84ac;
    float: right;
  }
}
</style>